home *** CD-ROM | disk | FTP | other *** search
- /*
- File: FileManagerTypes.h
-
- Contains: FileManager Fundamental Declarations & Definitions
-
- Version: System 8
-
- DRI: Bill Kain
-
- Copyright: © 1984-1996 by Apple Computer, Inc.
- All rights reserved.
-
- Warning: *** APPLE INTERNAL USE ONLY ***
- This file may contain unreleased API's
-
- BuildInfo: Built by: SuperMario Build Daemon
- With Interfacer: 2.0d11 (PowerPC native)
- From: FileManagerTypes.i
- Revision: 58
- Dated: 3/11/96
- Last change by: dkh
- Last comment: Add kFSVTBoolean simple property type enumeration. Add
-
- Bugs: Report bugs to Radar component “System Interfaces”, “Latest”
- List the version information (from above) in the Problem Description.
-
- */
- #ifndef __FILEMANAGERTYPES__
- #define __FILEMANAGERTYPES__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __ERRORS__
- #include <Errors.h>
- #endif
- #ifndef __KERNEL__
- #include <Kernel.h>
- #endif
- #ifndef __TEXTOBJECTS__
- #include <TextObjects.h>
- #endif
- #ifndef __MATH64__
- #include <Math64.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=power
- /* the following contents can only be used by compilers that support PowerPC struct alignment */
-
- #if FOR_SYSTEM8_PREEMPTIVE
- /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>> F o u n d a t i o n D e f i n i t i o n s <<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
- /*
- ****************************************************************************
- CONSTANTS & TYPES
- ****************************************************************************
- */
- /*
- FSAgentObjID is used to indicate a specific registered FS Agent.
- This value is not persistent across rebooting the machine or
- re-registering the given agent. It is in fact an object ID to
- which requests for the given agent should be sent.
- */
- typedef ObjectID FSAgentObjID;
- /*
- FSBufferDescriptor
- Tells the File Manager about the location and size of a buffer.
- Buffers are nominally arrays of structures, so FSBufferDescriptor
- lets you indicate the size of an array element, and the number of
- elements.
-
- bufferAddress
- Starting address of the buffer.
- itemSize
- The size (in bytes) of one array element. This would typically be
- the size of an FSPropertyStatusElement, or the size of the caller's
- property structure (i.e., for all properties of a single object).
- itemCount
- The number of array elements. When the buffer is for properties,
- this is usually equal to the number of objects. When the buffer
- is for status, this is usually the number of objects times the
- number of properties per object (i.e., the total number of properties).
-
- If itemCount is not 1, then the array elements are at addresses:
- bufferAddress, bufferAddress+itemSize, bufferAddress+2*itemSize, etc.
-
- Note: the actual length of the buffer is itemSize * itemCount bytes.
-
- Note: Some calls that take a (pointer to a) buffer descriptor allow you
- to pass NULL for that parameter. In that case, the API will create
- a buffer descriptor for you. It will set the itemCount to 1, and the
- bufferAddress and itemSize based on the FSBufferElementDescriptor's
- associated with the buffer. The bufferAddress will be the least offset
- and the itemSize will be the maximum (length + offset). The actual
- FSBufferElementDescriptors used by the File Manager will have their
- offset fields decremented by bufferAddress. This provides scatter-
- gather capability.
- */
- struct FSBufferDescriptor {
- LogicalAddress bufferAddress;
- ByteCount itemSize;
- ItemCount itemCount;
- };
- typedef struct FSBufferDescriptor FSBufferDescriptor;
-
- typedef FSBufferDescriptor *FSBufferDescriptorPtr;
- extern const FSBufferDescriptor kFSNullFSBufferDescriptor;
- /*
- FSBufferElementDescriptor
- Used to describe a field within a buffer described by an FSBufferDescriptor.
- (Actually, it describes a field within one of the array elements.)
-
- length
- Size (in bytes) of the field.
- offset
- Offset (in bytes) from the start of an array element to the start of the
- field. If the supplied pointer to the FSBufferDescriptor was NULL, then
- this is the actual (logical) address of the data. See FSBufferDescriptor.
- */
- struct FSBufferElementDescriptor {
- ByteCount length;
- ByteOffset offset;
- };
- typedef struct FSBufferElementDescriptor FSBufferElementDescriptor;
-
- typedef FSBufferElementDescriptor *FSBufferElementDescriptorPtr;
- /*
- //•• it's been suggested that this should be wide...
- //•• This type isn't used in any of the interface files; maybe
- //•• it should be removed?
- */
- typedef UInt32 FSCount;
- /*
- FSDate
- The standard type used to represent a date/time value. For example, the
- modification and creation date properties of an object would be formatted
- as FSDates.
-
- Note: an FSDate is really just a TimeObject, so you can use all the normal
- TimeObject facilities with them.
- */
- typedef TimeObject FSDate;
- /*
- FSName
- The standard type used for the name property of an object.
- ConstFSName
- An FSName that will not be changed by a called routine. Used in
- function declarations only.
-
- NOTE: Only persistent text objects are supported.
- */
- typedef TextObject FSName;
- typedef ConstTextObject ConstFSName;
- /*
- FSObjectPrivileges
- A set of flags that describe what operations can be performed
- on an open stream or mapped file.
-
- kFSCanReadForkProperty
- For streams, allow read operations (FSStreamSimpleRead and FSStreamRead).
- For mapped files, allow the file to be mapped such that the memory can be
- read (this is required).
- kFSCanWriteForkProperty
- For streams, allow write operations (FSStreamSimpleWrite and FSStreamWrite).
- For mapped files, allow the file to be mapped such that the memory can be
- written. If not set, then the memory can be mapped read-only.
- kFSCanExtendForkProperty
- For streams, allow the fork to grow (calls to FSStreamSetAbsoluteEOF,
- FSStreamSetEOF, or FSStreamAllocate that would cause the EOF to become
- larger). For mapped files, allow the memory area to grow, and allow
- changes to addresses beyond the EOF to actually be written to the fork;
- also allows FSMappedFileSetEOF to set the EOF to a larger value.
- kFSCanTruncateForkProperty
- For streams, allow the fork to shrink (calls to FSStreamSetAbsoluteEOF,
- FSStreamSetEOF, or FSStreamReleaseAllocation that would cause the EOF
- to become smaller). For mapped files, allow FSMappedFileSetEOF to change
- the EOF to a smaller value.
-
- Note: some volume formats may not be able to control each of these operations
- individually. You would usually set or clear the kFSCanWriteForkProperty,
- kFSCanExtendForkProperty and kFSCanTruncateForkProperty bits together.
- */
-
- enum {
- kFSInvalidPrivileges = 0x00000000,
- kFSCanReadForkProperty = 0x00000200,
- kFSCanWriteForkProperty = 0x00000400,
- kFSCanExtendForkProperty = 0x00000800,
- kFSCanTruncateForkProperty = 0x00001000
- };
-
- typedef OptionBits FSObjectPrivileges;
- /*
- FSObjectPrivilegesDenied
- A set of flags that describes which operations CANNOT be performed on
- an open stream or mapped file. These are the same flags as FSObjectPrivileges,
- but the name of the data type is changed as a reminder that the operations
- should NOT be allowed for the indicated entity.
- */
- typedef FSObjectPrivileges FSObjectPrivilegesDenied;
- /*
- FSOffset
- A signed 64-bit integer used to describe an offset into a property, or the
- difference between two positions. It is signed because it is a relative
- value (such as a negative offset from EOF).
- */
- typedef SInt64 FSOffset;
- /*
- FSPropertyStatusElement
- Used for returning status for a single property of an object, when a call
- can manipulate more than one property. Also used to return the actual
- length of a returned property (since buffer underflow is not an error).
-
- If a call returns the error E_PropertyException, then one or more properties
- had an error, and you should check the property status array. For example,
- this would be used when getting multiple properties; since some might not
- exist, you'd want an error for just those properties, but still allow the
- call to complete for the other properties.
-
- propertyStatus
- The status of the operation on the associated property.
- propertyValueActualSize
- The actual size (in bytes) of the returned property. If propertyStatus
- was E_PropertyBufferFieldTooSmall, then this field contains the actual
- size of the property so you can allocate enough space and try again (note:
- no valid data will be returned for the property in this case -- you get
- all or nothing).
- */
- struct FSPropertyStatusElement {
- OSStatus propertyStatus;
- ByteCount propertyValueActualSize;
- };
- typedef struct FSPropertyStatusElement FSPropertyStatusElement;
-
- typedef FSPropertyStatusElement *FSPropertyStatusElementPtr;
- /*
- kFSSingleInstanceProperty
- A constant used for constructing the tag for a property, when the
- property can only have one instance.
- */
-
- enum {
- kFSSingleInstanceProperty = 0
- };
-
- /*
- FSFileManagerPropertyTagVersion
- A subfield of some property tags, that indicates which version of
- the property should be used. This is typically used when the format
- of a property changes over time, to allow the older formats to be supported
- in newer versions of the File Manager or volume formats. For now, you
- should always use kFSCurrentReleasedVersion.
- */
-
- enum {
- kFSInvalidPropertyTagVersion = 0,
- kFSD10Version = 1,
- kFSD11NewAttributesVersion = 2,
- kFSCurrentReleasedVersion = kFSD11NewAttributesVersion
- };
-
- typedef UInt16 FSFileManagerPropertyTagVersion;
- /*
- FSSize
- The size of a property (or part of a property).
-
- Note: this is a signed 64-bit value. Since positions within a property
- (eg., in stream access) are specified by an FSOffset, which is also
- a signed 64-bit quantity, the maximum size of a property is restricted
- to 2^63 bytes. Having FSSize be a signed quantity makes it easier to
- mix with FSOffset.
- */
- typedef SInt64 FSSize;
- /*
- FSVolumeObjID
- A run-time value that identifies a particular volume. It may be used
- from any process (and passed between processes). It becomes invalid
- when the volume is unmounted. Note: FSVolumeObjID's are not reused
- immediately, so you can use notifications to invalidate any
- FSVolumeObjID's you may have in your own structures.
-
- For most File Manager operations, you will want to use the
- FSVolumeObjIDResolve call to obtain an FSObjectRef for the volume.
- */
- typedef ObjectID FSVolumeObjID;
- /*
- FSVolumeSetObjID
- A run-time value that identifies a particular set of volumes. It may
- be used from any process (and passed between processes). It becomes
- invalid when the volume set is deleted. Note: FSVolumeSetObjID's are
- not reused immediately, so you can use notifications to invalidate any
- FSVolumeSetObjID's you may have in your own structures.
-
- Note: At this time, there is only one FSVolumeSetObjID:
- kFStheBootVolumeSetObject. This corresponds to the set of volumes
- you would see on the Finder's desktop. In the future, there may
- be other volume sets. The value kFStheBootVolumeSetObject will
- always be valid.
-
- For most File Manager operations, you will want to use the
- FSVolumeSetGetInformation call to obtain an FSObjectRef for the volume
- set.
- */
- typedef ObjectID FSVolumeSetObjID;
- /*
- ****************************************************************************
- MACROS
- ****************************************************************************
- */
- /*
- M_AssignStructToFileManagerSimplePropertyTag
- A macro to copy an FSFileManagerSimplePropertyTag to the tag field
- of an FSProperty. The value being copied may be a pointer to any
- type; it will be treated as a pointer to a FSFileManagerSimplePropertyTag.
-
- strctAdrs (first parameter)
- Pointer to source tag (i.e. the value being copied).
- tgAdrs (second parameter)
- Pointer to the destination tag (i.e. the place to copy to).
- */
- #define M_AssignStructToFileManagerSimplePropertyTag(strctAdrs, tgAdrs) \
- *(FSFileManagerSimplePropertyTag *)(tgAdrs) = *(FSFileManagerSimplePropertyTag *)(strctAdrs)
- /*
- M_AssignStructToFileManagerForkPropertyTag
- A macro to copy an FSForkPropertyTag to the tag field of an FSProperty.
- The value being copied may be a pointer to any type; it will be treated
- as a pointer to a FSFileManagerSimplePropertyTag.
-
- strctAdrs (first parameter)
- Pointer to source tag (i.e. the value being copied).
- tgAdrs (second parameter)
- Pointer to the destination tag (i.e. the place to copy to).
- */
- #define M_AssignStructToFileManagerForkPropertyTag(strctAdrs, tgAdrs) \
- *(FSForkPropertyTag *)(tgAdrs) = *(FSForkPropertyTag *)(strctAdrs)
- /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> C o n t a i n e r s <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
- /*
- ****************************************************************************
- OBJECTS
- ****************************************************************************
- */
- /*
- FSObjectPersistentReference
- A structure used to persistently identify an object on a given volume.
- It is the caller's responsibility to keep track of the volume associated
- with the object.
-
- A persistent reference is a best-effort attempt to identify an object
- over time. For volume formats that have unique identifiers for all
- objects on a volume, those identifiers would usually be part of the
- persistent reference. It may also contain other information to help
- locate or verify the object (especially if there are no unique identifiers,
- or they are reused quickly).
-
- It is up to the volume format to determine what to store in a persistent
- reference. For some volume formats, changes to the object may cause the
- persistent reference to no longer find the object. It is even possible
- that a change to one or more objects may cause the persistent reference
- to resolve to a different object (which appears to be the original object).
- */
- struct FSObjectPersistentReference {
- ByteCount count;
- UInt32 reference[1];
- };
- typedef struct FSObjectPersistentReference FSObjectPersistentReference;
-
- typedef FSObjectPersistentReference *FSObjectPersistentReferencePtr;
- /*
- FSObjectRef
- A run-time identifier for an object controlled by the File Manager.
- FSObjectRef's are used by almost every call that indicates an object.
- FSObjectRef's are allocated and disposed on a per-process basis. If
- multiple processes have an FSObjectRef for the same object, then the
- FSObjectRef's will have the same value. If an FSObjectRef is disposed
- and later allocated for the same object, a different value for the
- FSObjectRef may be returned.
-
- Allocated FSObjectRef's consume memory and other resources inside the
- File Manager. You should dispose of them when you no longer need to
- identify the object. When a process terminates, all of its object
- ref's are disposed.
-
- When an FSObjectRef is returned by a File Manager call, it is auto-
- matically allocated for the caller's process. This is true even when
- the FSObjectRef is returned as a property of an object (as well as
- an explicit output parameter of type FSObjectRef).
-
- There are calls to obtain an FSObjectRef for an object specified by
- FSVolumeObjID, FSVolumeSetObjID, and persistent reference. There
- are calls to allocate an FSObjectRef for another process, or allocate
- another copy for your own process. There are calls to dispose an
- FSObjectRef, or dispose many of them at once (typically for cleaning
- up after having FSObjectRef's returned as properties by some other
- call).
- */
- typedef struct OpaqueFSObjectRef* FSObjectRef;
- /**/
- extern const FSObjectRef kFStheNullObjectRef;
- /*
- ============================================================================
- theBootVolumeSet
- ============================================================================
- */
- /*
- kFStheBootVolumeObject
- An FSVolumeObjID for the volume that the system was booted from.
- kFStheBootVolumeSetObject
- An FSVolumeSetObjID for the volume set containing the boot volume.
- */
- extern const FSVolumeObjID kFStheBootVolumeObject;
- extern const FSVolumeSetObjID kFStheBootVolumeSetObject;
- /*
- ============================================================================
- Volumes
- ============================================================================
- */
- /*
- FSMountAccessConstraints
- Specifies which operations can be performed on a volume by the indicated
- tasks. These constraints are given when the volume is mounted. They
- would typically be used by utility programs that need exclusive access
- to a volume.
-
- allowThisTask
- Operations allowed on the volume, for the task that mounted the volume.
- denyThisKernelProcess
- Operations forbidden on the volume, for any task in the process that
- mounted the volume (other than the task that actually mounted the volume).
- //•• This seems non-sensical, given the transitory nature of some tasks.
- denyOtherKernelProcesses
- Operations forbidden on the volume, for all processes other than the
- one that mounted the volume.
-
- //•• These clearly shouldn't be FSObjectPrivileges. There should be some
- //•• other type for privileges or contstraints on mounting (since object
- //•• privileges explicitly refer to forks).
- */
- struct FSMountAccessConstraints {
- FSObjectPrivileges allowThisTask;
- FSObjectPrivilegesDenied denyThisKernelProcess;
- FSObjectPrivilegesDenied denyOtherKernelProcesses;
- };
- typedef struct FSMountAccessConstraints FSMountAccessConstraints;
-
- typedef FSMountAccessConstraints *FSMountAccessConstraintsPtr;
- /*
- ****************************************************************************
- PROPERTIES
- ****************************************************************************
- */
- /*
- FSPropertyCreator
- Analogous to a file's creator, this is the creator for a property or
- set of properties. This can also be thought of as a class of properties.
- A property's creator defines which selectors are allowed.
-
- For example, the creator kFSFileManagerCreator is used for all properties
- defined by the File Manager (such as an object's name, creation date,
- object ref, etc.). The creator kFSUserExperienceCreator is used for
- properties used by the user experience (such as the Finder); it includes
- properties such as icons and comments.
-
- When application-defined properties are supported, an application could
- define and create new properties whose creator is the same as the creator
- for their application.
- */
- typedef OSType FSPropertyCreator;
- /*
- FSPropertySelector
- Analogous to a file's type, this identifies a specific property within a given
- creator (or class of properties). The set of allowable selectors and their
- meanings are defined based on the property's creator.
-
- The same selector may be used with different creators for completely different
- properties.
-
- There is one selector that is reserved regardless of creator:
- kFSForkPropertySelector.
-
- //•• Should Apple reserve values consisting of no upper-case letters, much like
- //•• we reserve creators?
- */
- typedef OSType FSPropertySelector;
- /*
- FSPropertyAttribute
- Identifies a particular attribute of a given property (as specified by
- creator and selector). You are most likely to use the value and size
- attributes of a property.
-
- Apple Computer reserves the right to define the set of valid attributes.
- */
- typedef OSType FSPropertyAttribute;
- /*
- FSPropertyTag
- Allows you to identify a particular instance, version, or format of
- a property. A FSPropertyTag is an opaque structure of 8 bytes. The
- actual format is defined by the property's creator (and possibly selector).
-
- An object may have multiple instances of a given property. For example, a
- word processor document might have an author property; if there is more
- than one author, there could be multiple instances of the property. You
- would use the tag to indicate which instance you want. A property's
- creator would typically define a data type for their tag(s), and possibly
- a function or macro to help in assigning them.
-
- Likewise, an object may have multiple formats. For example, an object's
- name can bet set or retrieved as: a text object, a Pascal string (ASCII
- text with leading length byte), a C string (ASCII text with trailing 0
- byte), or as pure ASCII text (whose length is denoted by the size attribute).
-
- Many property tags contain a version subfield. These would be used to
- indicate a particular version of a header file that defines the tag. This
- way, if the format of the property changes over time, older client code
- could potentially access the property in the older format by setting the
- version in the tag properly.
- */
- /*•• this is needed to force our distinguished constants out of the code section*/
- typedef void *FSPropertyTag[2];
- /*
- FSProperty
- Compeletely specifies a given instance (or version or format) of a
- given attribute of a given property (i.e. creator and selector).
- */
- struct FSProperty {
- FSPropertyCreator creator;
- FSPropertySelector selector;
- FSPropertyAttribute attribute;
- FSPropertyTag tag;
- };
- typedef struct FSProperty FSProperty;
-
- typedef FSProperty *FSPropertyPtr;
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Distinguished FSProperty Creators
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /*
- FSPropertyDistinguishedCreators
- These are the well-known creators used in properties.
- kFSFileManagerCreator
- Properties defined by the File Manager itself (such as an object's
- name, creation date, etc.).
- kFSUserExperienceCreator
- Properties defined by Apple's user experience (such as the Finder);
- includes such properties as an object's icon or comment.
- kFSUniverseCreator
- Properties unique to the Universe object, that would not be applicable
- to other objects.
- kFSBootVolumeSetCreator
- Properties unique to the boot volume set, that would not be applicable
- to other objects.
- //•• shouldn't this be just a volume set creator? Presumably, it would
- //•• be used for properties that might be supported by other volume sets.
- */
-
- enum {
- kFSFileManagerCreator = 'fmgr',
- kFSUniverseCreator = 'fmun',
- kFSBootVolumeSetCreator = 'fmbv',
- kFSUserExperienceCreator = 'uexp'
- };
-
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Fork Property Distinguished Selector
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /*
- FSForkPropertyDistinguishedSelector
- These are the set of selectors that are reserved across all creators.
- kFSForkPropertySelector
- This selector indicates a fork property: a property whose value attribute
- is a fork value attribute. The value can be accessed as an FSStream
- or as a mapped file. All other properties, or other attributes of a
- fork property may not be accessed this way.
- */
-
- enum {
- kFSForkPropertySelector = 'fork' /*••*/
- };
-
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Distinguished FSProperty Attributes
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /*
- FSPropertyDistinguishedAttributes
- These are the defined attributes for all properties.
-
- kFSValueAttribute
- The value of a property. It consists of 0 to 2^63 bytes for fork
- properties, or 0 to (2^32)-1 bytes for non-fork properties. For
- non-fork properties, the value must be accessed all at once.
-
- When retrieved, your buffer must be big enough to store the entire
- value. The File Manager will not truncate or pad any value. (If
- you supply more space than is required, the extra bytes will be
- unchanged).
-
- For fork properties, you use the FSStream or mapped file calls,
- which allow you to access part of the value.
- kFSSizeAttribute
- The size (in bytes) of a property's value. This may require up
- to 8 bytes to store (in the case of a fork property; for non-fork
- properties, it requires at most 4 bytes to store). Since the File
- Manager knows this is numeric, you may supply 1, 2, 4, or 8 bytes
- when getting or setting a size. The File Manager will coerce the
- value to or from the given size. If you supply fewer than 8 bytes,
- and the actual size cannot be represented in the given number of
- bytes, then you will get the E_PropertyBufferFieldTooSmall error.
- kFSTypeAttribute
- This is a basic description of the type of data (i.e. its format)
- stored in a property. This may be helpful when trying to interpret
- properties that you don't know about. Note: this is not an attempt
- to give detailed information about the data type stored in a property.
- This attribute is always 4 bytes long.
- kFSNullAttribute
- Used to indicate a non-existent attribute (for the null property).
- This is the attribute field of the null property. See also
- kFSFileManagerNullProperty. This attribute is always 0 bytes long.
- kFSForkPhysicalSizeAttribute
- This is the amount of physical storage allocated for a fork property's
- value on the volume's media. Note that this can be more or less than
- the size attribute (kFSSizeAttribute), depending on how the volume
- has allocated space for the property, and even the property's value.
-
- This attribute is a legacy for certain older APIs. Its use is
- discouraged. This attribute may be obsoleted in the future.
-
- This attribute is up to 8 bytes in length. It follows the same
- rules as kFSSizeAttribute for coercion to smaller lengths.
- kFSStateAttribute
- This attribute contains dynamic state information about a property.
- It consists of a series of flags; these flags are common to all
- properties.
-
- This attribute is not currently supported. It is intended to be
- used for things such as a read-only flag on a property-by-property
- basis. Since it is dynamic, it would tend to reflect any temporary
- software locks.
- kFSPolicyAttribute
- This attribute contains policy (static) information about a property.
- It consists of a series of flags; these flags are common to all
- properties.
-
- This attribute is not currently supported.
- */
-
- enum {
- kFSValueAttribute = 'valu',
- kFSSizeAttribute = 'size',
- kFSTypeAttribute = 'type',
- kFSNullAttribute = 'null',
- kFSForkPhysicalSizeAttribute = 'fsiz',
- kFSStateAttribute = 'stat',
- kFSPolicyAttribute = 'plcy'
- };
-
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Distinguished FSProperty Tag Templates
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /*
- FSForkType
- A list of the defined types of the File Manager's fork property.
- These values would appear in the forkType field of the property tag
- for a fork. Remember, there is only one fork property; use the forkType
- to select which kind of fork you want.
-
- kFSDataFork
- Specifies the data fork. This is the same as the data fork from the
- Files API, or the normal file contents of single-forked file systems
- such as MS-DOS or Unix.
- kFSResourceFork
- Specifies the resource fork. This is the same as the resource fork from
- the Files API.
- */
-
- enum {
- kFSInvalidForkType = 0,
- kFSDataFork = 1,
- kFSResourceFork = 2
- };
-
- typedef UInt16 FSForkType;
- /*
- FSForkPropertyTag
- The property tag used for the File Manager's fork property. You can
- declare a variable of this type, fill out the individual fields, then
- use the M_AssignStructToFileManagerForkPropertyTag macro to copy the
- tag into a more opaque (and generic) property tag stored in a normal
- FSProperty.
-
- version
- Version of the property and tag. This should be set to the value
- kFSCurrentReleasedVersion.
- forkType
- Specifies which kind of fork. See FSForkType.
- instance
- Specifies which instance of the given kind of fork.
- */
- struct FSForkPropertyTag {
- UInt16 version;
- FSForkType forkType;
- UInt32 instance;
- };
- typedef struct FSForkPropertyTag FSForkPropertyTag;
-
- typedef FSForkPropertyTag *FSForkPropertyTagPtr;
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Volume Set Distinguished Selector
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /**/
-
- enum {
- kFSVolumeSet = 'vlm#' /*••*/
- };
-
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Distinguished Properties by Creator
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /*
- ============================================================================
- Distinguished FileManager Universe (kFSUniverseCreator) Properties
- ============================================================================
- */
- /*
- ----------------------------------------------------------------------------
- Distinguished FileManager Universe (kFSUniverseCreator) Selectors
- ----------------------------------------------------------------------------
- */
- /**/
-
- enum {
- kFSCreatorList = 'crt#', /*••*/
- kFSVolumeSetList = 'vls#', /*••*/
- kFSBootVolume = 'btvl' /*••*/
- };
-
- /*
- ----------------------------------------------------------------------------
- Distinguished FileManager Universe (kFSUniverseCreator) Constants
- ----------------------------------------------------------------------------
- */
- extern const FSProperty kFSUniverseCreatorListPropertyValue;
- extern const FSProperty kFSUniverseVolumeSetListPropertyValue;
- extern const FSProperty kFSUniverseBootVolumePropertyValue;
- extern const FSProperty kFSUniverseCreatorListPropertyTemplate;
- extern const FSProperty kFSUniverseVolumeSetListPropertyTemplate;
- extern const FSProperty kFSUniverseBootVolumePropertyTemplate;
- /*
- ============================================================================
- Distinguished FileManager BootVolumeSet (kFSBootVolumeSetCreator) Properties
- ============================================================================
- */
- /*
- ----------------------------------------------------------------------------
- Distinguished FileManager BootVolumeSet (kFSBootVolumeSetCreator) Constants
- ----------------------------------------------------------------------------
- */
- extern const FSProperty kFSBootVolumeSetVolumeListPropertyValue;
- extern const FSProperty kFSBootVolumeSetVolumeListPropertyTemplate;
- /*
- ============================================================================
- Distinguished FileManager (kFSFileManagerCreator) Properties
- ============================================================================
- */
- /*
- ----------------------------------------------------------------------------
- Distinguished FileManager (kFSFileManagerCreator) Selectors
- ----------------------------------------------------------------------------
- */
- /**/
-
- enum {
- kFSNullPropertySelector = 'null', /*••*/
- kFSForkProperty = 'fork', /*••*/
- kFSForkPropertyList = 'frk#', /*••*/
- kFSSimplePropertyList = 'smp#', /*••*/
- kFSPropertyList = 'fsp#', /*••*/
- kFSPropertyDescriptorList = 'pdr#', /*••*/
- kFSObjectContainerObjectRef = 'ocor', /*••*/
- kFSObjectContainerObjectType = 'ocot', /*••*/
- kFSObjectContainerPersistentReference = 'ocpr', /*••*/
- kFSObjectRef = 'oref', /*••*/
- kFSObjectPersistentReference = 'pref', /*••*/
- kFSObjectType = 'otyp', /*••*/
- kFSObjectName = 'onam', /*••*/
- kFSObjectCreationDate = 'cdat', /*••*/
- kFSObjectModificationDate = 'mdat', /*••*/
- kFSObjectBackupDate = 'bdat', /*••*/
- kFSObjectAccessDate = 'adat', /*••*/
- kFSObjectLock = 'olck', /*••*/
- kFSObjectCumulativeModificationDate = 'cmdt', /*••*/
- kFSObjectCumulativeBackupDate = 'cbdt', /*••*/
- kFSObjectCumulativeAccessDate = 'cadt', /*••*/
- kFSVolumeCreationDate = 'vcdt', /*••*/
- kFSVolumeModificationDate = 'vmdt', /*••*/
- kFSVolumeBackupDate = 'vbdt', /*••*/
- kFSVolumeFileCount = 'vflc', /*••*/
- kFSVolumeFolderCount = 'vfdc', /*••*/
- kFSVolumeObjectCount = 'vobc', /*••*/
- kFSVolumeFormat = 'vfmt', /*••*/
- kFSVolumeCapability = 'vcap', /*••*/
- kFSVolumeBlockCount = 'vbct', /*••*/
- kFSVolumeBlockFreeCount = 'vbfr', /*••*/
- kFSVolumeBlockSize = 'vbsz', /*••*/
- kFSVolumeSize = 'vsiz', /*••*/
- kFSVolumeFreeSize = 'vbfs', /*••*/
- kFSVolumeIOQuanta = 'vioq', /*••*/
- kFSVolumeLock = 'vlck', /*••*/
- kFSFileCount = 'filc', /*••*/
- kFSFolderCount = 'fldc', /*••*/
- kFSObjectCount = 'objc', /*••*/
- kFSVolumeStartupFolderObjectRef = 'strt' /*••*/
- };
-
- /*
- ----------------------------------------------------------------------------
- Distinguished FileManager (kFSFileManagerCreator) Constants
- ----------------------------------------------------------------------------
- */
- extern const FSProperty kFSFileManagerNullProperty;
- /**/
- extern const FSProperty kFSFileManagerForkPropertyValue;
- extern const FSProperty kFSFileManagerForkPropertySize;
- extern const FSProperty kFSFileManagerForkPropertyTemplate;
- /**/
- extern const FSProperty kFSFileManagerForkPropertyListPropertyValue;
- extern const FSProperty kFSFileManagerSimplePropertyListPropertyValue;
- extern const FSProperty kFSFileManagerPropertyListPropertyValue;
- extern const FSProperty kFSFileManagerPropertyDescriptorListPropertyValue;
- extern const FSProperty kFSFileManagerForkPropertyListPropertyTemplate;
- extern const FSProperty kFSFileManagerSimplePropertyListPropertyTemplate;
- extern const FSProperty kFSFileManagerPropertyListPropertyTemplate;
- extern const FSProperty kFSFileManagerPropertyDescriptorListPropertyTemplate;
- /**/
- extern const FSProperty kFSFileManagerObjectContainerObjectRefPropertyValue;
- extern const FSProperty kFSFileManagerObjectContainerObjectTypePropertyValue;
- extern const FSProperty kFSFileManagerObjectContainerPersistentReferencePropertyValue;
- extern const FSProperty kFSFileManagerObjectRefPropertyValue;
- extern const FSProperty kFSFileManagerObjectPersistentReferencePropertyValue;
- extern const FSProperty kFSFileManagerObjectTypePropertyValue;
- extern const FSProperty kFSFileManagerObjectNamePropertyValue;
- extern const FSProperty kFSFileManagerObjectCreationDatePropertyValue;
- extern const FSProperty kFSFileManagerObjectModificationDatePropertyValue;
- extern const FSProperty kFSFileManagerObjectBackupDatePropertyValue;
- extern const FSProperty kFSFileManagerObjectAccessDatePropertyValue;
- extern const FSProperty kFSFileManagerObjectLockPropertyValue;
- extern const FSProperty kFSFileManagerObjectContainerObjectRefPropertyTemplate;
- extern const FSProperty kFSFileManagerObjectContainerObjectTypePropertyTemplate;
- extern const FSProperty kFSFileManagerObjectContainerPersistentReferencePropertyTemplate;
- extern const FSProperty kFSFileManagerObjectRefPropertyTemplate;
- extern const FSProperty kFSFileManagerObjectPersistentReferencePropertyTemplate;
- extern const FSProperty kFSFileManagerObjectTypePropertyTemplate;
- extern const FSProperty kFSFileManagerObjectNamePropertyTemplate;
- extern const FSProperty kFSFileManagerObjectCreationDatePropertyTemplate;
- extern const FSProperty kFSFileManagerObjectModificationDatePropertyTemplate;
- extern const FSProperty kFSFileManagerObjectBackupDatePropertyTemplate;
- extern const FSProperty kFSFileManagerObjectAccessDatePropertyTemplate;
- extern const FSProperty kFSFileManagerObjectLockPropertyTemplate;
- /**/
- extern const FSProperty kFSFileManagerObjectCumulativeModificationDatePropertyValue;
- extern const FSProperty kFSFileManagerObjectCumulativeBackupDatePropertyValue;
- extern const FSProperty kFSFileManagerObjectCumulativeAccessDatePropertyValue;
- extern const FSProperty kFSFileManagerObjectCumulativeModificationDatePropertyTemplate;
- extern const FSProperty kFSFileManagerObjectCumulativeBackupDatePropertyTemplate;
- extern const FSProperty kFSFileManagerObjectCumulativeAccessDatePropertyTemplate;
- /**/
- extern const FSProperty kFSFileManagerVolumeCreationDatePropertyValue;
- extern const FSProperty kFSFileManagerVolumeModificationDatePropertyValue;
- extern const FSProperty kFSFileManagerVolumeBackupDatePropertyValue;
- extern const FSProperty kFSFileManagerVolumeFileCountPropertyValue;
- extern const FSProperty kFSFileManagerVolumeFolderCountPropertyValue;
- extern const FSProperty kFSFileManagerVolumeObjectCountPropertyValue;
- extern const FSProperty kFSFileManagerVolumeFormatPropertyValue;
- extern const FSProperty kFSFileManagerVolumeCapabilityPropertyValue;
- extern const FSProperty kFSFileManagerVolumeBlockCountPropertyValue;
- extern const FSProperty kFSFileManagerVolumeBlockFreeCountPropertyValue;
- extern const FSProperty kFSFileManagerVolumeBlockSizePropertyValue;
- extern const FSProperty kFSFileManagerVolumeSizePropertyValue;
- extern const FSProperty kFSFileManagerVolumeFreeSizePropertyValue;
- extern const FSProperty kFSFileManagerVolumeIOQuantaPropertyValue;
- extern const FSProperty kFSFileManagerVolumeLockPropertyValue;
- extern const FSProperty kFSFileManagerVolumeCreationDatePropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeModificationDatePropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeBackupDatePropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeFileCountPropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeFolderCountPropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeObjectCountPropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeFormatPropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeCapabilityPropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeBlockCountPropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeBlockFreeCountPropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeBlockSizePropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeSizePropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeFreeSizePropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeIOQuantaPropertyTemplate;
- extern const FSProperty kFSFileManagerVolumeLockPropertyTemplate;
- /**/
- extern const FSProperty kFSFileManagerFileCountPropertyValue;
- extern const FSProperty kFSFileManagerFolderCountPropertyValue;
- extern const FSProperty kFSFileManagerObjectCountPropertyValue;
- extern const FSProperty kFSFileManagerFileCountPropertyTemplate;
- extern const FSProperty kFSFileManagerFolderCountPropertyTemplate;
- extern const FSProperty kFSFileManagerObjectCountPropertyTemplate;
- /**/
- extern const FSProperty kFSFileManagerVolumeStartupFolderObjectRefValue;
- extern const FSProperty kFSFileManagerVolumeStartupFolderObjectRefTemplate;
- /*
- ============================================================================
- Distinguished UserExperience (kFSUserExperienceCreator) Properties
- ============================================================================
- */
- /*
- ----------------------------------------------------------------------------
- Distinguished UserExperience (kFSUserExperienceCreator) Selectors
- ----------------------------------------------------------------------------
- */
- /*
- The first five selectors are properties of a container and take an ObjectSpecification
- to an object on a volume. The remaining properties are properties of a volume and take
- an ObjectSpecification to the volume in question.
- */
-
- enum {
- kFSFinderBasicInfo = 'bfin', /* The old style FInfo record.*/
- kFSFinderExtendedInfo = 'xfin', /* The old style FXInfo record.*/
- kFSFinderVolumeInfo = 'fvin', /* Eight longwords of private Finder volume information*/
- kFSDocumentType = 'type', /* Just the finder fdType information.*/
- kFSDocumentCreator = 'crtr', /* Just the finder fdCreator information.*/
- kFSComment = 'cmnt', /* The comment from the DTDB for an object.*/
- /* */
- kFSApplication = 'APPL', /* Returns a FSObjectRef to the most recent */
- /* application specified in tag.*/
- kFSApplicationList = 'APP#', /* Returns a list of 'APPL's*/
- kFSLargeIcon = 'ICN#', /* The tag for this property is a type/creator pair*/
- kFSLarge4BitIcon = 'icl4', /* The tag for this property is a type/creator pair*/
- kFSLarge8BitIcon = 'icl8', /* The tag for this property is a type/creator pair*/
- kFSSmallIcon = 'ics#', /* The tag for this property is a type/creator pair*/
- kFSSmall4BitIcon = 'ics4', /* The tag for this property is a type/creator pair*/
- kFSSmall8BitIcon = 'ics8' /* The tag for this property is a type/creator pair*/
- };
-
- /*
- ----------------------------------------------------------------------------
- Distinguished UserExperience (kFSUserExperienceCreator) Constants
- ----------------------------------------------------------------------------
- */
- extern const FSProperty kFSUserExperienceFinderBasicInfoPropertyValue;
- extern const FSProperty kFSUserExperienceFinderExtendedInfoPropertyValue;
- extern const FSProperty kFSUserExperienceFinderVolumeInfoPropertyValue;
- extern const FSProperty kFSUserExperienceDocumentTypePropertyValue;
- extern const FSProperty kFSUserExperienceDocumentCreatorPropertyValue;
- extern const FSProperty kFSUserExperienceCommentPropertyValue;
- extern const FSProperty kFSUserExperienceFinderBasicInfoPropertyTemplate;
- extern const FSProperty kFSUserExperienceFinderExtendedInfoPropertyTemplate;
- extern const FSProperty kFSUserExperienceFinderVolumeInfoPropertyTemplate;
- extern const FSProperty kFSUserExperienceDocumentTypePropertyTemplate;
- extern const FSProperty kFSUserExperienceDocumentCreatorPropertyTemplate;
- extern const FSProperty kFSUserExperienceCommentPropertyTemplate;
- extern const FSProperty kFSUserExperienceApplicationPropertyValue;
- extern const FSProperty kFSUserExperienceApplicationPropertyTemplate;
- extern const FSProperty kFSUserExperienceApplicationListPropertyValue;
- extern const FSProperty kFSUserExperienceLargeIconPropertyValue;
- extern const FSProperty kFSUserExperienceLarge4BitIconPropertyValue;
- extern const FSProperty kFSUserExperienceLarge8BitIconPropertyValue;
- extern const FSProperty kFSUserExperienceSmallIconPropertyValue;
- extern const FSProperty kFSUserExperienceSmall4BitIconPropertyValue;
- extern const FSProperty kFSUserExperienceSmall8BitIconPropertyValue;
- extern const FSProperty kFSUserExperienceApplicationListPropertyTemplate;
- extern const FSProperty kFSUserExperienceLargeIconPropertyTemplate;
- extern const FSProperty kFSUserExperienceLarge4BitIconPropertyTemplate;
- extern const FSProperty kFSUserExperienceLarge8BitIconPropertyTemplate;
- extern const FSProperty kFSUserExperienceSmallIconPropertyTemplate;
- extern const FSProperty kFSUserExperienceSmall4BitIconPropertyTemplate;
- extern const FSProperty kFSUserExperienceSmall8BitIconPropertyTemplate;
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Object Property Simple Value Types
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /*
- FSSimplePropertyValueType
- */
-
- enum {
- kFSVTInvalidValueType = 0,
- kFSVTSInt8 = 1,
- kFSVTUInt8 = 2,
- kFSVTSInt16 = 3,
- kFSVTUInt16 = 4,
- kFSVTSInt32 = 5,
- kFSVTUInt32 = 6,
- kFSVTSInt64 = 7,
- kFSVTUInt64 = 8,
- kFSVTBoolean = 9,
- kFSVTByteCount = 10,
- kFSVTByteOffset = 11,
- kFSVTItemCount = 12,
- kFSVTOptionBits = 13,
- kFSVTBufferDescriptor = 14,
- kFSVTBufferElementDescriptor = 15,
- kFSVTOSType = 16,
- kFSVTCStr = 17,
- kFSVTCharacterStr = 18,
- kFSVTPStr = 19,
- kFSVTPersistentTextObject = 20,
- kFSVTUniCodeStr = 21,
- kFSVTDOSDate = 22,
- kFSVTISO9660Date = 23,
- kFSVTMacDate = 24,
- kFSVTUNIXDate = 25,
- kFSVTTimeObject = 26,
- kFSVTCount = 27,
- kFSVTValueTypeEnumerator = 28,
- kFSVTDate = 29,
- kFSVTForkPropertyType = 30,
- kFSVTName = 31,
- kFSVTObjectRef = 32,
- kFSVTOffset = 33,
- kFSVTPersistentObjectReference = 34,
- kFSVTProperty = 35,
- kFSVTPropertyDescriptor = 36,
- kFSVTSize = 37,
- kFSVTEnumeratedValueTypeMask = 0x7F,
- kFSVTPropertyCreatorDefinedValueType = 0x80
- };
-
- typedef UInt32 FSSimplePropertyValueType;
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Distinguished FileManager FSProperty Value Templates
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /*
- FSFileSystemKind is used to indicate a type of filesystem.
- Apple reserves values with all lower case letters, and
- those whose first two bytes are nil (for compatibility
- with old FSID's)
- */
- typedef OSType FSFileSystemKind;
- /**/
-
- enum {
- kFSInvalidObjectType = 0x00000000,
- kFStheUniverse = 0x00000001,
- kFStheBootVolumeSet = 0x00000002,
- kFSVolume = 0x00000004,
- kFSFolder = 0x00000008,
- kFSFile = 0x00000010
- };
-
- typedef OptionBits FSObjectType;
- /*
- FSBlockCount holds a number of blocks (such as total blocks or free blocks on
- a volume).
-
- FSBlockNum holds a number specifying a fork block or a volume block.
-
- •• Eventually, we will get rid of these private types and use the one
- defined by BlockStorage. Also note that the value is intentionally signed.
- This solves several problems that arise from the lack of proper 64 bit math
- support.
- */
- typedef SInt64 FSBlockCount;
- typedef SInt64 FSBlockNum;
- /**/
-
- enum {
- kFSUnspecifiedVolumeCapabilities = 0x00000000,
- kFSSupportsNotification = 0x00000001,
- kFSSupportsAFPPermissions = 0x00000002,
- kFSSupportsACLPermissions = 0x00000004,
- kFSSupportsLogicalToPhysical = 0x00000008,
- kFSSupportsRangeLocking = 0x00000010,
- kFSFilesAPILooselyCompliant = 0x00000020,
- kFSFilesAPIStrictlyCompliant = 0x00000040,
- kFSSupportsUserProperties = 0x00000080,
- kFSSupportsShortNames = 0x00000100,
- kFSSupportsFSObjectMove = 0x00000200,
- kFSSupportsFSObjectCopy = 0x00000400,
- kFSSupportsAccessDeny = 0x00000800,
- kFSSupportsBooting = 0x00001000,
- kFSSupportsSystem = 0x00002000,
- kFSSupportsDesktop = 0x00004000,
- kFSIsEjectable = 0x00008000
- };
-
- typedef OptionBits FSVolumeCapabilities;
- /**/
- typedef OSType FSVolumeFormat;
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Distinguished FileManager Simple Property Tag Templates
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /**/
- struct FSFileManagerSimplePropertyTag {
- FSFileManagerPropertyTagVersion version;
- UInt16 reserved;
- UInt32 instance;
- };
- typedef struct FSFileManagerSimplePropertyTag FSFileManagerSimplePropertyTag;
-
- typedef FSFileManagerSimplePropertyTag *FSFileManagerSimplePropertyTagPtr;
- /*
- ============================================================================
- FileManager Date Property Tag Templates:
- kFSObjectCreationDate
- kFSObjectModificationDate
- kFSObjectBackupDate
- kFSObjectAccessDate
- kFSObjectCumulativeModificationDate
- kFSObjectCumulativeBackupDate
- kFSObjectCumulativeAccessDate
- ============================================================================
- */
- /**/
-
- enum {
- kFSInvalidDateFormat = 0,
- kFSDOSDateFormat = 1,
- kFSISO9660DateFormat = 2,
- kFSMacDateFormat = 3,
- kFSUNIXDateFormat = 4,
- kFSTimeObjectFormat = 5
- };
-
- typedef UInt16 FSObjectDateType;
- /**/
- struct FSObjectDatePropertyTag {
- FSFileManagerPropertyTagVersion version;
- FSObjectDateType dateType;
- UInt32 instance;
- };
- typedef struct FSObjectDatePropertyTag FSObjectDatePropertyTag;
-
- typedef FSObjectDatePropertyTag *FSObjectDatePropertyTagPtr;
- /*
- ============================================================================
- FileManager Name (kFSObjectName) Property Tag Templates
- ============================================================================
- */
- /**/
-
- enum {
- kFSInvalidStringFormat = 0,
- kFSCharacterStringFormat = 1,
- kFSCStringFormat = 2,
- kFSPStringFormat = 3,
- kFSUniCodeStringFormat = 4,
- kFSPersistentTextObjectStringFormat = 5
- };
-
- typedef UInt16 FSObjectNameType;
- /**/
- struct FSObjectNamePropertyTag {
- FSFileManagerPropertyTagVersion version;
- FSObjectNameType nameType;
- UInt32 instance;
- };
- typedef struct FSObjectNamePropertyTag FSObjectNamePropertyTag;
-
- typedef FSObjectNamePropertyTag *FSObjectNamePropertyTagPtr;
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Distinguished UserExperience FSProperty Value Templates
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- typedef FSObjectRef FSUserExperienceApplicationInfo;
- typedef FSUserExperienceApplicationInfo *FSUserExperienceApplicationInfoPtr;
- typedef FSObjectNameType FSObjectCommentType;
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Distinguished UserExperience FSProperty Tags
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- struct FSIconPropertyTag {
- OSType creator;
- OSType documentType;
- };
- typedef struct FSIconPropertyTag FSIconPropertyTag;
-
- typedef FSIconPropertyTag *FSIconPropertyTagPtr;
- struct FSApplicationInfoPropertyTag {
- OSType creator;
- FSObjectRef object;
- };
- typedef struct FSApplicationInfoPropertyTag FSApplicationInfoPropertyTag;
-
- typedef FSApplicationInfoPropertyTag *FSApplicationInfoPropertyTagPtr;
- struct FSObjectCommentPropertyTag {
- UInt16 reserved;
- FSObjectCommentType commentype;
- UInt32 instance;
- };
- typedef struct FSObjectCommentPropertyTag FSObjectCommentPropertyTag;
-
- typedef FSObjectCommentPropertyTag *FSObjectCommentPropertyTagPtr;
- /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> C a p a b i l i t i e s <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
- /*
- ****************************************************************************
- PROPERTY ACCESS METHODS
- ****************************************************************************
- */
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Object Property Simple Values
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /*
- ============================================================================
- Simple Property Access Method (Get/Set/Create/Delete )
- ============================================================================
- */
- /*
- FSPropertyDescriptor's associate simple FSProperty's with specific instances
- of their attributes An attribute location is either an offset within some addressed
- buffer or the address of the attribute. This is determined from the context those
- calls that use FSPropertyDescriptors -- if an associated buffer is provided with
- a property descriptor in a call, the location is an offset. If the associated
- buffer is elided, the location is an address.
-
- */
- struct FSPropertyDescriptor {
- FSProperty property;
- UInt32 offsetOrAddress;
- ByteCount length;
- };
- typedef struct FSPropertyDescriptor FSPropertyDescriptor;
-
- typedef FSPropertyDescriptor *FSPropertyDescriptorPtr;
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Object Property Fork Values
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /* */
- struct FSForkAccessConstraints {
- FSObjectPrivileges allowThisTask;
- FSObjectPrivilegesDenied denyThisKernelProcess;
- FSObjectPrivilegesDenied denyOtherKernelProcesses;
- };
- typedef struct FSForkAccessConstraints FSForkAccessConstraints;
-
- typedef FSForkAccessConstraints *FSForkAccessConstraintsPtr;
- /**/
-
- enum {
- kFSAllocAny = 0x00000000, /* need not be contiguous; partial allocation is OK*/
- kFSAllocContiguous = 0x00000001, /* if set, allocated space must be contiguous*/
- kFSAllocAllOrNothing = 0x00000002 /* if set, must allocate all of the space asked for (no partial success)*/
- };
-
- typedef OptionBits FSForkAllocationPolicy;
- /**/
-
- enum {
- kFSAtMark = 0,
- kFSFromStart = 1,
- kFSFromLEOF = 2,
- kFSFromMark = 3
- };
-
- typedef UInt32 FSForkPosition;
- /* */
- struct FSForkPositionDescriptor {
- FSOffset positionOffset;
- FSForkPosition positionMode;
- };
- typedef struct FSForkPositionDescriptor FSForkPositionDescriptor;
-
- typedef FSForkPositionDescriptor *FSForkPositionDescriptorPtr;
- /*
- ============================================================================
- Stream-based Access Method
- ============================================================================
- */
- /**/
-
- enum {
- kFSDefaultIOOptions = 0,
- kFSWriteThroughCache = 0x80000000,
- kFSDoNotCache = 0x40000000,
- kFSSequentialAccess = 0x20000000,
- kFSStreamIOOptionsReservedMask = 0x1FFFFFFF /* ~(kFSDefaultIOOptions | kFSWriteThroughCache | kFSDoNotCache | kFSSequentialAccess)*/
- };
-
- typedef OptionBits FSStreamIOOptions;
- typedef FSStreamIOOptions *FSStreamIOOptionsPtr;
- /* */
- typedef ObjectID FSStreamObjID;
- /**/
-
- enum {
- kFSRangeLockNullOptions = 0x00000000,
- kFSRangeLockExclusive = 0x00000001, /* Allow exclusive read/write to range (else shared read-only)*/
- kFSRangeLockAllowPartial = 0x00000002, /* Lock until next conflicting lock (else don't lock anything)*/
- kFSRangeLockMaximalLength = 0x00000004 /* Lock extends to largest possible (positive) offset*/
- };
-
- typedef OptionBits FSRangeLockOptions;
- /**/
-
- enum {
- kFSMarkPinToEOF = 0x00000001 /* if set, and the new mark would exceed the EOF, then set the mark to the EOF*/
- };
-
- typedef OptionBits FSStreamSetMarkOptions;
- /*
- ============================================================================
- Memory-Mapped Access Method
- ============================================================================
- */
- /* */
- typedef BackingObjectID FSBackingStoreObjID;
- /*
- ****************************************************************************
- NAVIGATION & ENUMERATION
- ****************************************************************************
- */
- /**/
-
- enum {
- kFSInvalidObjectIteratorCreationOptions = 0,
- kFSIncludetheUniverse = 0x00000001,
- kFSIncludetheBootVolumeSet = 0x00000002,
- kFSIncludeVolumes = 0x00000004,
- kFSIncludeFolders = 0x00000008,
- kFSIncludeFiles = 0x00000010,
- kFSTraverseEmbeddedContainers = 0x01000000
- };
-
- typedef OptionBits FSObjectIteratorCreationOptions;
- /**/
-
- enum {
- kFSInvalidObjectIteratorMovement = 0,
- kFSObjectEnter = 1,
- kFSObjectExit = 2
- };
-
- typedef UInt32 FSObjectIteratorMovement;
- /*
- ============================================================================
- Object Iteration
- ============================================================================
- */
- /**/
- typedef ObjectID FSObjectIteratorObjID;
- /*
- These are the public (returned by FSObjectIteratorGetInformation) iterator states.
- Other private state flags are defined in FileManagerPriv.i.
- */
-
- enum {
- kFSInvalidIteratorState = 0x0000, /* End of Iteration state*/
- kFSIteratorEOI = 0x0001, /* End of Iteration state*/
- kFSIteratorSOI = 0x0002 /* Start of Iteration state*/
- };
-
- typedef UInt32 FSObjectIteratorState;
- /*
- ============================================================================
- Object Resolution
- ============================================================================
- */
- /**/
-
- enum {
- kFSObjectPathwayInvalidTag = 0x00000000,
- kFSObjectPathwayIteratorMovementElement = 0x00000001,
- kFSObjectPathwayPropertyElement = 0x00000002
- };
-
- typedef UInt32 FSObjectPathwayTag;
- /**/
- struct FSObjectPathwayElement {
- FSObjectPathwayTag tag;
- union {
- FSObjectIteratorMovement movement;
- FSPropertyDescriptor property;
- } element;
- };
- typedef struct FSObjectPathwayElement FSObjectPathwayElement;
-
- typedef FSObjectPathwayElement *FSObjectPathwayElementPtr;
- /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> F a c i l i t i e s <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Status Codes
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
-
- enum {
- FSFilesAPIErrorBias = 0xF4000000, /* the upper short which identifies a file system error*/
- FSErrorBias = 0xF5000000, /* the upper short which identifies a file system error*/
- FSErrorBiasMask = 0xFF000000, /* how to discriminate non-FileManager errors*/
- FSAgentErrorBias = 0xF6000000 /* the upper short which identifies an agent error*/
- };
-
-
- enum {
- FSFilesAPIErrorMask = FSFilesAPIErrorBias | 0xFFFF, /* how to convert from old error codes to new ones*/
- FSErrorMask = FSErrorBias | 0xFFFF, /* how to convert from old error codes to new ones*/
- FSAgentErrorBiasMask = FSAgentErrorBias | 0xFFFF /* how to discriminate non-agent errors*/
- };
-
- /*
- MacOS aliased Exceptions
- ••restore this from <30>
- */
-
- enum {
- E_NoErr = (noErr & FSErrorMask),
- E_NoError = E_NoErr, /* alias for noErr*/
- E_ParamErr = (paramErr & FSErrorMask), /* alias for paramErr in Errors.h*/
- E_FolderFulErr = (dirFulErr & FSErrorMask), /* Folder full*/
- E_DirFulErr = E_FolderFulErr, /* Directory full*/
- E_DskFulErr = (dskFulErr & FSErrorMask), /* disk full*/
- E_DiskFull = E_DskFulErr,
- E_NSVErr = (nsvErr & FSErrorMask), /* no such volume*/
- E_VolumeNotFound = E_NSVErr,
- E_IOErr = (ioErr & FSErrorMask), /* I/O Err*/
- E_BdNamErr = (bdNamErr & FSErrorMask), /* there may be no bad names in the final system!*/
- E_BadName = E_BdNamErr,
- E_FnOpnErr = (fnOpnErr & FSErrorMask), /* File not open*/
- E_FileNotOpen = E_FnOpnErr,
- E_EofErr = (eofErr & FSErrorMask), /* End of file*/
- E_EndOfFileErr = E_EofErr,
- E_PosErr = (posErr & FSErrorMask), /* tried to position to before start of file (r/w)*/
- E_PosOutOfRange = E_PosErr, /* position is invalid (before start of file, or out of range for filesystem)*/
- E_MFulErr = (mFulErr & FSErrorMask), /* memory full (open) or file won't fit (load)*/
- E_MemFullErr = E_MFulErr,
- E_TMFOErr = (tmfoErr & FSErrorMask), /* too many files open*/
- E_FnfErr = (fnfErr & FSErrorMask), /* File not found*/
- E_FileNotFound = E_FnfErr,
- E_WPrErr = (wPrErr & FSErrorMask), /* diskette is write protected.*/
- E_WriteProtected = E_WPrErr,
- E_FLckdErr = (fLckdErr & FSErrorMask), /* file is locked*/
- E_FileLocked = E_FLckdErr,
- E_VLckdErr = (vLckdErr & FSErrorMask), /* volume is locked*/
- E_VolumeLocked = E_VLckdErr,
- E_FBsyErr = (fBsyErr & FSErrorMask), /* File is busy (delete)*/
- E_FileInUse = E_FBsyErr,
- E_DupFNErr = (dupFNErr & FSErrorMask), /* duplicate filename (rename)*/
- E_DuplicateName = E_DupFNErr,
- E_OpWrErr = (opWrErr & FSErrorMask), /* file already open with with write permission*/
- E_WriteAccessDenied = E_OpWrErr,
- E_RfNumErr = (rfNumErr & FSErrorMask), /* refnum Err*/
- E_BadObjectID = E_RfNumErr,
- E_GfpErr = (gfpErr & FSErrorMask), /* get file position Err*/
- E_GetFilePosition = E_GfpErr,
- E_VolOffLinErr = (volOffLinErr & FSErrorMask), /* volume not on line Err*/
- E_VolumeOffline = E_VolOffLinErr,
- E_PermErr = (permErr & FSErrorMask), /* permissions Err*/
- E_PermissionViolation = E_PermErr,
- E_VolOnLinErr = (volOnLinErr & FSErrorMask), /* drive volume already on-line at MountVol*/
- E_NSDrvErr = (nsDrvErr & FSErrorMask), /* no such drive (tried to mount a bad drive num)*/
- E_NoMacDskErr = (noMacDskErr & FSErrorMask), /* not a mac diskette (sig bytes are wrong)*/
- E_ExtFSErr = (extFSErr & FSErrorMask), /* volume in question belongs to an external fs*/
- E_FSRnErr = (fsRnErr & FSErrorMask), /* file system internal Err*/
- E_BadMDBErr = (badMDBErr & FSErrorMask), /* bad master directory block*/
- E_WrPermErr = (wrPermErr & FSErrorMask), /* write permissions Err*/
- E_DirNFErr = (dirNFErr & FSErrorMask), /* Directory not found*/
- E_FolderNotFound = E_DirNFErr,
- E_DirectoryNotFound = E_FolderNotFound,
- E_TMWDOErr = (tmwdoErr & FSErrorMask), /* No free WDCB available*/
- E_BadMovErr = (badMovErr & FSErrorMask), /* Move into offspring Err*/
- E_IllegalMove = E_BadMovErr,
- E_WrgVolTypErr = (wrgVolTypErr & FSErrorMask), /* Wrong volume type Err*/
- E_VolGoneErr = (volGoneErr & FSErrorMask), /* Server volume has been disconnected.*/
- E_FIDNotFound = (fidNotFound & FSErrorMask), /* no file thread exists.*/
- E_FIDExists = (fidExists & FSErrorMask), /* file id already exists*/
- E_NotAFileErr = (notAFileErr & FSErrorMask), /* non-file object specified*/
- E_DiffVolErr = (diffVolErr & FSErrorMask), /* files on different volumes*/
- E_CatChangedErr = (catChangedErr & FSErrorMask), /* the catalog has been modified*/
- E_DesktopDamagedErr = (desktopDamagedErr & FSErrorMask), /* desktop database files are corrupted*/
- E_SameFileErr = (sameFileErr & FSErrorMask), /* can't exchange a file with itself*/
- E_BadFidErr = (badFidErr & FSErrorMask), /* file id is dangling or doesn't match with the file number*/
- E_AfpItemNotFound = (afpItemNotFound & FSErrorMask), /* information not found*/
- E_AfpIconTypeError = (afpIconTypeError & FSErrorMask) /* sizes of new icon and one it replaces don't match*/
- };
-
- /* General Exceptions that could be shared by different modules*/
-
- enum {
- E_MissingParameter = FSErrorBias | 0x0001, /* one or more mandatory parameters missing*/
- E_InvalidMsg = FSErrorBias | 0x0002, /* invalid message*/
- /* reserved = FSErrorBias | 0x0003,*/
- E_InvalidForkType = FSErrorBias | 0x0004, /* ForkType not recognized or not supported*/
- E_ForkInUse = FSErrorBias | 0x0005, /* fork is currently in use*/
- E_PropertyNotFound = FSErrorBias | 0x0006, /* Requested Property is not found*/
- E_ObjectNotFound = FSErrorBias | 0x0007, /* Requested Object is not found*/
- E_MemoryFull = E_MemFullErr, /* PoolAllocate returned nil*/
- E_NotAFileOrFolder = FSErrorBias | 0x0008, /* Given object is not a file or a Folder*/
- E_TooManyParameters = FSErrorBias | 0x0009, /* one or another parameter, but not both*/
- E_PatternNotFound = FSErrorBias | 0x000A, /* Couldn't find pattern in buffer*/
- E_BufferLength = FSErrorBias | 0x000B, /* Illegal buffer size*/
- E_InvalidDirectoryNum = FSErrorBias | 0x000C, /* Invalid Directory Number*/
- E_IllegalFileOperation = FSErrorBias | 0x000D,
- E_IllegalFolderOperation = FSErrorBias | 0x000E,
- E_IllegalVolumeOperation = FSErrorBias | 0x000F,
- E_InvalidRelationship = FSErrorBias | 0x0010, /* FSRelationship is invalid in the context of the operation*/
- E_UnknownRelationship = FSErrorBias | 0x0011, /* FSRelationship is undefined*/
- E_DoesNotMatch = FSErrorBias | 0x0012
- };
-
- /* FSAgent Interface Exceptions*/
-
- enum {
- E_NoGetBlockProc = FSErrorBias | 0x0101,
- E_NoReleaseBlockProc = FSErrorBias | 0x0102,
- E_NoSetEndOfForkProc = FSErrorBias | 0x0103,
- E_NoSetBlockSizeProc = FSErrorBias | 0x0104,
- E_NoReadBlockProc = FSErrorBias | 0x0105,
- E_NoWriteBlockProc = FSErrorBias | 0x0106,
- E_NoForkMapBlockProc = FSErrorBias | 0x0107,
- E_NoReadRangeProc = FSErrorBias | 0x0108,
- E_NoWriteRangeProc = FSErrorBias | 0x0109
- };
-
- /* BTree Module Exceptions*/
-
- enum {
- E_AccessMethodStart = FSErrorBias | 0x0200, /* BTree Module Errors*/
- E_BadHeader = FSErrorBias | 0x0300,
- E_BadRotate = FSErrorBias | 0x0301,
- E_NotOpenAsBTree = FSErrorBias | 0x0302, /* no BTreeCB has been allocated for fork*/
- E_AlreadyOpenAsBTree = FSErrorBias | 0x0303,
- E_NoBTreeIterator = FSErrorBias | 0x0308,
- E_BTreeIsEmpty = FSErrorBias | 0x030A,
- E_NoMoreMapNodes = FSErrorBias | 0x030B,
- E_BadNodeSize = FSErrorBias | 0x030C,
- E_BadNodeType = FSErrorBias | 0x030D,
- E_BadMaxKeyLength = FSErrorBias | 0x030E,
- E_BadKeyDescriptor = FSErrorBias | 0x030F,
- E_MinimumKeyTooLong = FSErrorBias | 0x0310,
- E_RecordWontFit = FSErrorBias | 0x0311, /* Existing BTree Errors*/
- E_BeforeBeginingOfFile = FSErrorBias | 0x0353,
- E_PastEndOfFile = FSErrorBias | 0x0354,
- E_UnknownBTreeVersion = FSErrorBias | 0x0355,
- E_NoKeyCompareProc = FSErrorBias | 0x0356,
- E_TreeTooDeep = FSErrorBias | 0x0357,
- E_NoKeyDescriptor = FSErrorBias | 0x0358,
- E_Reserved = FSErrorBias | 0x0359,
- E_BadUserID = FSErrorBias | 0x035A,
- E_UnknownKeyDescType = FSErrorBias | 0x035B,
- E_BadKeyDescLength = FSErrorBias | 0x035C,
- E_PlaceMarkerInvalid = FSErrorBias | 0x035D,
- E_BadKeyField = FSErrorBias | 0x035E,
- E_BadKeyAttribute = FSErrorBias | 0x035F,
- E_BadKeyLength = FSErrorBias | 0x0360,
- E_RecordNotFound = FSErrorBias | 0x0361,
- E_RecordExists = FSErrorBias | 0x0362,
- E_NoSpaceLeft = FSErrorBias | 0x0363,
- E_RecordTooBig = FSErrorBias | 0x0364,
- E_BadNode = FSErrorBias | 0x0365,
- E_NotABTree = FSErrorBias | 0x0366,
- E_LastBTreeError = FSErrorBias | 0x03FF
- };
-
- /* Cache Module Exceptions*/
-
- enum {
- E_NonExist = FSErrorBias | 0x0400, /* cache block does not exist*/
- E_BufferInUse = FSErrorBias | 0x0401, /* cache buffer is in use*/
- E_MissingCacheCB = FSErrorBias | 0x0402, /* cache control block is missing from Fork/Vol CB*/
- E_CorruptCacheCB = FSErrorBias | 0x0403, /* cache control block associated with Fork/Vol CB is corrupt*/
- E_BufferHeaderOverflow = FSErrorBias | 0x0404, /* cache buffer header size is greater than the page size*/
- E_SGListOverflow = FSErrorBias | 0x0405, /* scatter gather list's address range is not big enough*/
- /* to accomodate the entire block range*/
- E_InvalidBlockSize = FSErrorBias | 0x0406, /* volume/fork block size is not of the kind 512,1K,2K,4K…*/
- E_NoPageToRelinquish = FSErrorBias | 0x0407, /* cache release Q is empty; can't relinquish a page to VM*/
- E_NoEmptyBufferHeaders = FSErrorBias | 0x0408, /* no more empty buffer headers left; time for creating more*/
- E_AlreadyInCache = FSErrorBias | 0x0409, /* all blocks asked for are already in cache*/
- E_NoPagesToClean = FSErrorBias | 0x040A /* no more pages to clean by page cleaner*/
- };
-
- /* Control Blocks Module Exceptions*/
-
- enum {
- E_NoCBPtr = FSErrorBias | 0x0501, /* CBPtr is nil*/
- E_NoSuchPath = FSErrorBias | 0x0502,
- E_NoSuchFork = FSErrorBias | 0x0503,
- E_NoSuchFile = FSErrorBias | 0x0504,
- E_NoSuchVolume = FSErrorBias | 0x0505,
- E_NoSuchFSAgent = FSErrorBias | 0x0506,
- E_InvalidCBType = FSErrorBias | 0x0507,
- E_InvalidCBPtr = FSErrorBias | 0x0508,
- E_InvalidParent = FSErrorBias | 0x0509,
- E_NoFSAgents = FSErrorBias | 0x050A,
- E_NoQHeadPtr = FSErrorBias | 0x050B,
- E_ChildStillQueued = FSErrorBias | 0x050C,
- E_LastCBError = FSErrorBias | 0x05FF /* Last error for Control Blocks Module*/
- };
-
- /* FSObjectRef Exceptions*/
-
- enum {
- E_UndefinedObjectRef = FSErrorBias | 0x0601,
- E_ObjectRefAlreadyInitialized = FSErrorBias | 0x0602,
- E_ObjectRefAlreadyExists = FSErrorBias | 0x0603,
- E_InvalidObjectRef = FSErrorBias | 0x0604 /* kFStheNullObjectRef was passed*/
- };
-
- /* Range Lock Module Exceptions*/
-
- enum {
- E_RangeNotLocked = FSErrorBias | 0x0701, /* Tried to unlock a range that wasn't locked*/
- E_NoAsyncLock = FSErrorBias | 0x0702, /* Tried to cancel an async lock, not pending*/
- E_LockedByOther = FSErrorBias | 0x0703, /* Conflicting lock owned by different path*/
- E_LockedBySelf = FSErrorBias | 0x0704, /* Conflicting lock owned by same path*/
- E_LockedForRead = FSErrorBias | 0x0705 /* Conflicting read lock (owner unknown)*/
- };
-
- /* Utilities Module Exceptions*/
-
- enum {
- E_UtilitiesStart = FSErrorBias | 0x0800
- };
-
- /* Volume Exceptions*/
-
- enum {
- E_MajorOfflineChange = FSErrorBias | 0x0901,
- E_MinorOfflineChange = FSErrorBias | 0x0902,
- E_VolumeInUse = FSErrorBias | 0x0903
- };
-
- /* FSIterator Exceptions*/
-
- enum {
- E_InvalidIterationObjectType = FSErrorBias | 0x0A01, /* can't enter a file object*/
- E_ExitIteratorScope = FSErrorBias | 0x0A02, /* iterator exited the scope*/
- E_IteratorScopeException = FSErrorBias | 0x0A03, /* iterator is undefined due to error or movement of scope locality*/
- E_UnknownIterationMovement = FSErrorBias | 0x0A04, /* iterator movement is not defined*/
- E_InvalidIterationMovement = FSErrorBias | 0x0A05, /* iterator movement is invalid in current context*/
- E_IteratorOwnership = FSErrorBias | 0x0A06, /* wrong client process ID*/
- E_EndOfIteration = FSErrorBias | 0x0A07 /* there were no objects left to return on iteration*/
- };
-
- /* FSProperty Exceptions*/
-
- enum {
- E_PropDescrOffsetRangeErr = FSErrorBias | 0x0B01, /* Property descriptor list has offset out of range*/
- E_PropDescrOverrunLengthErr = FSErrorBias | 0x0B02, /* PropOverrun bit map is too short*/
- /* reserved = FSErrorBias | 0x0B03,*/
- E_PropDescrNotFoundLengthErr = FSErrorBias | 0x0B04, /* PropNotFound bit map is too short*/
- E_PropDescrReadOnlyFailLengthErr = FSErrorBias | 0x0B05, /* PropDescrReadOnlyFail bit map is too short*/
- E_PropBufferShort = FSErrorBias | 0x0B06, /* Buffer too short for Properties.*/
- E_PropertyBufferFieldTooSmall = FSErrorBias | 0x0B07, /* From pt of view of supplied buffer field*/
- E_PropertyException = FSErrorBias | 0x0B08, /* */
- /* PropertiesGet: field is not adaquate to hold Property, field is truncated. (Overrun)*/
- E_PropertyBufferFieldTooLarge = FSErrorBias | 0x0B09, /* From pt of view of supplied buffer field*/
- /* PropertiesGet: field is larger than needed to hold Properties. (Underflow)*/
- E_CanNotFindDesktopDatabase = FSErrorBias | 0x0B0A, /* either desktopDB or desktopDF not found*/
- E_CanNotFindPDSFile = FSErrorBias | 0x0B0B, /* cannot find PDS*/
- E_CanNotFindEDSFile = FSErrorBias | 0x0B0C, /* cannot find EDS*/
- E_PropertyAlreadyExists = FSErrorBias | 0x0B0D, /* Property already exists in desktop database*/
- E_PropertyTypeError = FSErrorBias | 0x0B0E, /* error getting/setting Property in desktop database*/
- E_PropertyError = FSErrorBias | 0x0B0F, /* error getting/setting Property in desktop database*/
- E_PropertyReadOnly = FSErrorBias | 0x0B10 /* attempt to set read-only property*/
- };
-
- /* FSDispatch Errors*/
-
- enum {
- E_UnknownRequest = FSErrorBias | 0x1001, /* Request Command ID not defined*/
- E_VolRecognized = E_NoError, /* Agent was able to recognize the Volume*/
- E_VolNotRecognized = FSErrorBias | 0x1002, /* Agent was NOT able to recognize the Volume*/
- E_CanInitialize = E_NoError, /* Agent is able to initialize Volume*/
- E_CanNotInitialize = FSErrorBias | 0x1003, /* Agent is NOT able to initialize Volume*/
- E_NotAPath = FSErrorBias | 0x1004, /* ID used was not for a Path*/
- E_NotAFork = FSErrorBias | 0x1005, /* ID used was not for a Fork*/
- E_NotAFile = FSErrorBias | 0x1006, /* ID used was not for a File*/
- E_NotAVolume = FSErrorBias | 0x1007, /* ID used was not for a Volume*/
- E_NotAnAgent = FSErrorBias | 0x1008, /* ID used was not for an Agent*/
- E_NotAnObjectIterator = FSErrorBias | 0x1009, /* ID used was not for an Object Iterator*/
- E_NotAPropertyIterator = FSErrorBias | 0x100A, /* ID used was not for a Property Iterator*/
- E_AgentIncomplete = FSErrorBias | 0x100B, /* Agent did not finish instalation protocol*/
- E_QueueOverflow = FSErrorBias | 0x100C, /* A Notification Queue has overflowed the user's size*/
- E_QueueEmpty = FSErrorBias | 0x100D, /* The Notification Queue is Empty*/
- /* the message length is either larger than the size from the messaging services, or is smaller than implied by the variable data needs*/
- E_MessageLength = FSErrorBias | 0x100E,
- E_NoVolumeSpecified = FSErrorBias | 0x100F, /* No Volume was specified for PathnameResolve*/
- /* Dispatch or Request Processing Task*/
- E_MessageMustBeAtomic = FSErrorBias | 0x1010,
- E_MessageMustNotBeAtomic = FSErrorBias | 0x1011,
- E_MessageSentToWrongObject = FSErrorBias | 0x1012,
- E_InvalidVolumeSet = FSErrorBias | 0x1013, /* VolumeSetGetInformation: volumeSet is not recognized*/
- E_FSShutdown = FSErrorBias | 0x10F1 /* terminated because system was shutting down*/
- };
-
- /* General File Manager Errors*/
-
- enum {
- E_Unimplemented = FSErrorBias | 0xFFFF /* Feature unimplemented*/
- };
-
- /*
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- SNS SERVICES: FILE SYSTEMS EVENTS
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- */
- /*
- ============================================================================
- SNSKind SNSSubject Info
- -------------------------------------- -------------------------- -----------------------
- kFSEventObjectChangedKind FSEventObjectSubject NULL
- kFSEventVolumeStateChangedKind FSEventVolumeSubject NULL
- kFSEventVolumeObjectsChangedKind FSEventVolumeSubject FSEventPersistentInfo/FSEventDeleteInfo
- kFSEventPropertyChangedForObjectsKind FSEventPropertySubject FSEventPersistentInfo
- kFSEventObjectPropertiesChangedKind FSEventObjectSubject FSEventPropertyInfo
- kFSEventObjectsinFolderChangedKind FSEventObjectSubject FSEventPersistentInfo/FSEventDeleteInfo
-
- Note: FSEventPersistentInfo/FSEventDeleteInfo means that for create we use FSEventPersistentInfo
- because no body has access to the the run time ID of a new object. For delete we use
- FSEventDeleteInfo because nothing can be done with PersistentInfo of a deleted objects,
- but those with run time ID may wish to match them.
- ============================================================================
- */
- /*
- The FSEventOperation type is used in the interface whenever an event needs
- to report the manner in which something changed: was it created, deleted,
- or just modified. The FSEventOperation’s are enumerated values for which
- the following constants are currently defined:
- */
-
- enum {
- kFSInvalidEvent = 0,
- kFSEventAny = 1,
- kFSEventCreation = 2,
- kFSEventMounting = kFSEventCreation,
- kFSEventComingOnline = kFSEventCreation,
- kFSEventDeletion = 3,
- kFSEventUnmounting = kFSEventDeletion,
- kFSEventGoingOffline = kFSEventDeletion,
- kFSEventModification = 4
- };
-
- typedef UInt32 FSEventOperation;
- /*
- FSEventSNSKind: SNSKind for File System events
- */
-
- enum {
- kFSEventObjectChangedKind = 'fsoc', /* 0x66736f63 */
- kFSEventVolumeStateChangedKind = 'fsvc', /* 0x66737663 */
- kFSEventPropertyChangedForObjectsKind = 'fspo', /* 0x6673706f */
- kFSEventObjectPropertiesChangedKind = 'fsop', /* 0x66736f70 */
- kFSEventObjectsinFolderChangedKind = 'fsfo',
- kFSEventVolumeObjectsChangedKind = 'fsvo'
- };
-
- /*
- FSEventSNSService: SNSService for File System events
- */
-
- enum {
- kFSEventNotificationService = 'fsys'
- };
-
- /**/
- struct FSEventObjectInfo {
- ItemCount count;
- FSObjectRef objects[1];
- };
- typedef struct FSEventObjectInfo FSEventObjectInfo;
-
- typedef FSEventObjectInfo *FSEventObjectInfoPtr;
- /**/
- struct FSEventPersistentInfo {
- ItemCount count;
- FSObjectPersistentReference objects[1];
- };
- typedef struct FSEventPersistentInfo FSEventPersistentInfo;
-
- typedef FSEventPersistentInfo *FSEventPersistentInfoPtr;
- struct FSEventDeleteInfo {
- FSObjectRef object;
- FSDate date;
- TextObjectUnit name[1];
- };
- typedef struct FSEventDeleteInfo FSEventDeleteInfo;
-
- typedef FSEventDeleteInfo *FSEventDeleteInfoPtr;
- /**/
- struct FSEventObjectPropertyInfo {
- ItemCount count;
- FSProperty properties[1];
- };
- typedef struct FSEventObjectPropertyInfo FSEventObjectPropertyInfo;
-
- typedef FSEventObjectPropertyInfo FSEventObjectPropertyInfoPtr;
- /**/
- struct FSEventObjectSubject {
- FSEventOperation operation;
- FSObjectRef object;
- };
- typedef struct FSEventObjectSubject FSEventObjectSubject;
-
- typedef FSEventObjectSubject FSEventObjectSubjectPtr;
- struct FSEventVolumeSubject {
- FSEventOperation operation;
- FSVolumeObjID volume;
- };
- typedef struct FSEventVolumeSubject FSEventVolumeSubject;
-
- typedef FSEventVolumeSubject FSEventVolumeSubjectPtr;
- /**/
- struct FSEventObjectPropertySubject {
- FSEventOperation operation;
- FSProperty property;
- };
- typedef struct FSEventObjectPropertySubject FSEventObjectPropertySubject;
-
- typedef FSEventObjectPropertySubject FSEventObjectPropertySubjectPtr;
- /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> U N I O N S <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
- /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> C O M P A B I L I T Y <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
- #define kFSUniverseCreatorListProperty kFSUniverseCreatorListPropertyValue
- #define kFSUniverseVolumeSetListProperty kFSUniverseVolumeSetListPropertyValue
- #define kFSUniverseBootVolumeProperty kFSUniverseBootVolumePropertyValue
- #define kFSBootVolumeSetVolumeListProperty kFSBootVolumeSetVolumeListPropertyValue
- #define kFSFileManagerForkPropertyValueProperty kFSFileManagerForkPropertyValuePropertyValue
- #define kFSFileManagerForkPropertyListProperty kFSFileManagerForkPropertyListPropertyValue
- #define kFSFileManagerSimplePropertyListProperty kFSFileManagerSimplePropertyListPropertyValue
- #define kFSFileManagerPropertyListProperty kFSFileManagerPropertyListPropertyValue
- #define kFSFileManagerPropertyDescriptorListProperty kFSFileManagerPropertyDescriptorListPropertyValue
- /**/
- #define kFSFileManagerObjectContainerObjectRefProperty kFSFileManagerObjectContainerObjectRefPropertyValue
- #define kFSFileManagerObjectContainerObjectTypeProperty kFSFileManagerObjectContainerObjectTypePropertyValue
- #define kFSFileManagerObjectContainerPersistentReferenceProperty kFSFileManagerObjectContainerPersistentReferencePropertyValue
- #define kFSFileManagerObjectRefProperty kFSFileManagerObjectRefPropertyValue
- #define kFSFileManagerObjectPersistentReferenceProperty kFSFileManagerObjectPersistentReferencePropertyValue
- #define kFSFileManagerObjectTypeProperty kFSFileManagerObjectTypePropertyValue
- #define kFSFileManagerObjectNameProperty kFSFileManagerObjectNamePropertyValue
- #define kFSFileManagerObjectCreationDateProperty kFSFileManagerObjectCreationDatePropertyValue
- #define kFSFileManagerObjectModificationDateProperty kFSFileManagerObjectModificationDatePropertyValue
- #define kFSFileManagerObjectBackupDateProperty kFSFileManagerObjectBackupDatePropertyValue
- #define kFSFileManagerObjectAccessDateProperty kFSFileManagerObjectAccessDatePropertyValue
- /**/
- #define kFSFileManagerObjectCumulativeModificationDateProperty kFSFileManagerObjectCumulativeModificationDatePropertyValue
- #define kFSFileManagerObjectCumulativeBackupDateProperty kFSFileManagerObjectCumulativeBackupDatePropertyValue
- #define kFSFileManagerObjectCumulativeAccessDateProperty kFSFileManagerObjectCumulativeAccessDatePropertyValue
- /**/
- #define kFSFileManagerVolumeFormatProperty kFSFileManagerVolumeFormatPropertyValue
- #define kFSFileManagerVolumeCapabilityProperty kFSFileManagerVolumeCapabilityPropertyValue
- #define kFSFileManagerVolumeBlockCountProperty kFSFileManagerVolumeBlockCountPropertyValue
- #define kFSFileManagerVolumeBlockFreeCountProperty kFSFileManagerVolumeBlockFreeCountPropertyValue
- #define kFSFileManagerVolumeBlockSizeProperty kFSFileManagerVolumeBlockSizePropertyValue
- #define kFSFileManagerVolumeFreeSizeProperty kFSFileManagerVolumeFreeSizePropertyValue
- #define kFSFileManagerVolumeIOQuantaProperty kFSFileManagerVolumeIOQuantaPropertyValue
- /**/
- #define kFSFileManagerFileCountProperty kFSFileManagerFileCountPropertyValue
- #define kFSFileManagerFolderCountProperty kFSFileManagerFolderCountPropertyValue
- #define kFSFileManagerObjectCountProperty kFSFileManagerObjectCountPropertyValue
- #define kFSUserExperienceFinderBasicInfoProperty kFSUserExperienceFinderBasicInfoPropertyValue
- #define kFSUserExperienceFinderExtendedInfoProperty kFSUserExperienceFinderExtendedInfoPropertyValue
- #define kFSUserExperienceDocumentTypeProperty kFSUserExperienceDocumentTypePropertyValue
- #define kFSUserExperienceDocumentCreatorProperty kFSUserExperienceDocumentCreatorPropertyValue
- #define kFSUserExperienceCommentProperty kFSUserExperienceCommentPropertyValue
- #define kFSUserExperienceApplicationProperty kFSUserExperienceApplicationPropertyValue
- #define kFSUserExperienceApplicationListProperty kFSUserExperienceApplicationListPropertyValue
- #define kFSUserExperienceLargeIconProperty kFSUserExperienceLargeIconPropertyValue
- #define kFSUserExperienceLarge4BitIconProperty kFSUserExperienceLarge4BitIconPropertyValue
- #define kFSUserExperienceLarge8BitIconProperty kFSUserExperienceLarge8BitIconPropertyValue
- #define kFSUserExperienceSmallIconProperty kFSUserExperienceSmallIconPropertyValue
- #define kFSUserExperienceSmall4BitIconProperty kFSUserExperienceSmall4BitIconPropertyValue
- #define kFSUserExperienceSmall8BitIconProperty kFSUserExperienceSmall8BitIconPropertyValue
- #endif
-
- #pragma options align=reset
- #endif /* PRAGMA_ALIGN_SUPPORTED */
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __FILEMANAGERTYPES__ */
-
-